using Cooking.Core.Model;
using Cooking.UnitTest.Helpers;
using Xunit;

namespace Cooking.UnitTest.Core.Model
{
    public class AddAStepToRecipe
    {
        [Fact]
        public void Can_add_a_step_to_a_recipe()
        {
            Recipe r = RecipeBuilder.HamSandwich();
            PreparationStep step = new PreparationStep {Description = "Place ham on one slice of bread", SequenceNumber = 1};

            r.Steps.ShouldBeEmpty();
            r.AddStep(step);
            r.Steps.Count.ShouldBeEqualTo(1);
            r.Steps[0].BelongsTo.ShouldBeEqualTo(r);
        }
        
    }
}